package com.lianniu.web.staff.service.impl;

import com.lianniu.web.base.BaseResult;
import com.lianniu.web.product.model.Page;
import com.lianniu.web.seller.vo.Supply;
import com.lianniu.web.staff.dao.StaffClientDao;
import com.lianniu.web.staff.service.StaffClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017-05-17.
 */
@Service
public class StaffClientServiceImpl implements StaffClientService {
    @Autowired
    StaffClientDao staffClientDao;
    @Override
    public BaseResult getClient(String userId, int pageNum) {
        int count = this.staffClientDao.getClientCount(userId);
        Page page = new Page(count, pageNum);
        List<Supply> list = this.staffClientDao.getClient(userId, page);

        return BaseResult.success(list);
    }
}
